<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>Edit Scope baseline</title>
    <!-- Bootstrap -->
    <link href="../../css/bootstrap.min.css" rel="stylesheet">
                              
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>

<body>
      <div class="container" style="margin-top: 3%; width: 70%; height: 100%;" ng-app="scope_baseline" ng-controller="scope_controller" ng-init="cimaturity2='scope-beta'; cimaturity3='scope-release';">
            <div class="panel panel-primary">
                <div class="panel-heading"><h3>Scopebaseline</h3></div>
                <div class="panel-body">
                    <form>
                          <div class="panel panel-default">
                            <div class="panel-heading">
                                <h4>BaseInfo</h4>
                            </div>
                            <div class="panel-body">
                                <div class="row">
                                    <label class="col-sm-3 text-right">author name: </label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control " ng-model="base_info.author" placeholder="please input author name" disabled><br>
                                    </div>
                                </div>
                                <div class="row">
                                    <label class="col-sm-3 text-right">creat time:</label>
                                    <div class="col-sm-8">
                                        <input type="datetime" class="form-control" placeholder="create time" ng-model="base_info.created_time" disabled><br>
                                    </div> 
                                </div>
                                <div class="row">
                                    <label class="col-sm-3 text-right">version:</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" ng-model="base_info.version" disabled><br>
                                    </div>
                                </div>
                                <div class="row">
                                <label class="col-sm-3 text-right">CIMaturity:</label>
                                <div class="col-sm-8">
                                    <select class='form-control'>
                                        <option>{{base_info.cimaturity}}</option>
                                        <option>{{cimaturity2}}</option>
                                        <option>{{cimaturity3}}</option>
                                    </select>
                                </div>
                                </div>
                                <div class="row"><br></div>
                                <div class="row">
                                    <label class="col-sm-3 text-right">description:</label>
                                    <div class="col-sm-8">
                                        <textarea class="form-control" rows="3" placeholder="please input some description" ng-model="base_info.desc"></textarea>
                                    </div>
                                </div>
                            </div>
                          </div>

                          <div class="panel panel-default">
                            <div class="panel-heading">
                                <h4>Instance</h4>
                            </div>
                            <div class="panel-body">
                                <div class="row">
                                    <h4 class="alert alert-info col-sm-6 col-sm-offset-3 text-center" ng-click="show_saas()"> SAAS</h4>
                                </div>
                                <div class="row">
                                    <table class="table table-hover table-striped table-responsive" ng-show="saas_table_state">
                                        <tr>
                                            <td>Name</td>
                                            <td>SpecVersion</td>
                                            <td>ReleaseNO</td>
                                            <td>BuildNO</td>
                                            <td>Branch</td>
                                            <td>QAMaturity</td>
                                        </tr>
                                        <tr ng-repeat="component in saas_com_list">
                                            <td>{{component.name}}</td>
                                            <td><input type="text" class="form-control" style="width: 60px;" ng-model="component.spec_version"></td>
                                            <td><input type="text" class="form-control" style="width: 60px;" ng-model="component.release_no"></td>
                                            <td><input type="text" class="form-control" style="width: 60px;" ng-model="component.build_no"></td>
                                            <td>
                                            <select class="form-control">
                                                <option>{{component.branch}}</option>
                                                <option>master</option>
                                            </select>
                                            </td>
                                            <td>
                                            
                                            <select class="form-control">
                                                <option>{{component.qa}}</option>
                                                <option>release</option>
                                            </select>
                                            </td>
                                        </tr>
                                    </table>
                                </div>

                                <div class="row">
                                    <h4 class="alert alert-info col-sm-6 col-sm-offset-3 text-center" ng-click="show_paas()">PAAS</h4>
                                </div>
                                <div class="row">
                                        <table class="table table-hover table-striped table-responsive" ng-show="paas_table_state">
                                        <tr>
                                            <td>Name</td>
                                            <td>SpecVersion</td>
                                            <td>ReleaseNO</td>
                                            <td>BuildNO</td>
                                            <td>Branch</td>
                                            <td>QAMaturity</td>
                                        </tr>
                                        <tr ng-repeat="component in paas_com_list">
                                            <td>{{component.name}}</td>
                                            <td><input type="text" class="form-control" style="width: 60px;" ng-model="component.spec_version"></td>
                                            <td><input type="text" class="form-control" style="width: 60px;" ng-model="component.release_no"></td>
                                            <td><input type="text" class="form-control" style="width: 60px;" ng-model="component.build_no"></td>
                                            <td>
                                            <select class="form-control">
                                                <option>{{component.branch}}</option>
                                                <option>master</option>
                                            </select>
                                            </td>
                                            <td>
                                            <select class="form-control">
                                                <option>{{component.qa}}</option>
                                                <option>release</option>
                                            </select>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                                <div class="row">
                                    <h4 class="alert alert-info col-sm-6 col-sm-offset-3 text-center" ng-click="show_daas()">DAAS</h4>
                                </div>
                                <div class="row">
                                   <table class="table table-hover table-striped table-responsive" ng-show="daas_table_state">
                                        <tr>
                                            <td>Name</td>
                                            <td>SpecVersion</td>
                                            <td>ReleaseNO</td>
                                            <td>BuildNO</td>
                                            <td>Branch</td>
                                            <td>QAMaturity</td>
                                        </tr>
                                        <tr ng-repeat="d_component in daas_com_list">
                                            <td>{{d_component.name}}</td>
                                            <td><input type="text" class="form-control" style="width: 60px;" ng-model="d_component.spec_version"></td>
                                            <td><input type="text" class="form-control" style="width: 60px;" ng-model="d_component.release_no"></td>
                                            <td><input type="text" class="form-control" style="width: 60px;" ng-model="d_component.build_no"></td>
                                            <td>
                                            <select class="form-control">
                                                <option>{{d_component.branch}}</option>
                                                <option>master</option>
                                            </select>
                                            </td>
                                            <td>
                                            <select class="form-control">
                                                <option>{{d_component.qa}}</option>
                                                <option>release</option>
                                            </select>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                          </div>
                    </form>
                </div>
                <div class="row">
                    <div class="col-sm-12 text-center">
                        <button class="btn btn-primary btn-lg" ng-click="save_form()" data-toggle="modal" data-target="#confirm_scope_modal" title="请务必填写好表单之后再按此按钮提交，并获得commit UID!!!">提交</button>
                    </div>
                </div>
                <div class="row"><div><br></div></div>
               
                <!-- Modal -->
                <div class="modal fade" id="confirm_scope_modal" tabindex="-1" role="dialog" aria-labelledby="scopeConfirmModalLabel">
                  <div class="modal-dialog" role="document">
                    <div class="modal-content">
                      <div class="modal-header alert alert-info">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="scopeConfirmModalLabel">消息提示</h4>
                      </div>
                      <div class="modal-body">
                            <div class="panel panel-warning">
                                <div class="panel-heading">
                                    请确认:  
                                </div>
                                <div class="panel-body">
                                    <div class="row" ng-show="git_msg_state">
                                        <div class="col-sm-5 text-center"><h5 class="alert alert-success">{{git_msg}}</h5></div>
                                    </div>
                                    <div class="row">
                                        <h4>
                                            {{modal_warning_msg}}
                                        </h4>
                                    </div>
                                </div>
                            </div>
                      </div>
                      <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                        <button type="button" class="btn btn-primary" ng-click="change_modal_warning_msg()">保存</button>
                      </div>
                    </div>
                  </div>
                </div>

            </div>
      </div>

      <script src="../../js/base/jquery.min.js"></script>
      <script src="../../js/base/bootstrap.min.js"></script>
      <script src="../../js/base/angular.js"></script>
      <script src="../../js/app/scopebaseline.js"></script>
      <script src="../../js/controller/scopebaseline_controller.js"></script>
</body>
</html>

